package unit7.moveField;

import lombok.Getter;

/**
 * @author v_irlwang
 * @date 2021/3/16
 */
@Getter
public class Person {

    private String name;
    private String officeAreaCode;
    private String officeNumber;


    public String getTelephoneNumber() {
        return "(" + officeAreaCode + ")" + officeNumber;
    }

    public void setOfficeAreaCode(String officeAreaCode) {
        this.officeAreaCode = officeAreaCode;
    }

    public void setOfficeNumber(String officeNumber) {
        this.officeNumber = officeNumber;
    }
}


/**
 * after refactoring
 */
class TelephoneNumber {

    private String areaCode;

    String getAreaCode() {
        return this.areaCode;
    }

    void setAreaCode(String arg) {
        this.areaCode = arg;
    }

}
